Learn R Programming

sits (version 1.5.0)

`sits_labels<-`: Change the labels of a set of time series

Description

Given a sits tibble with a set of labels, renames the labels to the specified in value.

Usage

sits_labels(data) <- value

# S3 method for sits sits_labels(data) <- value

# S3 method for probs_cube sits_labels(data) <- value

# S3 method for class_cube sits_labels(data) <- value

# S3 method for default sits_labels(data) <- value

Value

A sits tibble or data cube with modified labels.

A probs or class_cube cube with modified labels.

Arguments

data

Data cube or time series.

value

A character vector used to convert labels. Labels will be renamed to the respective value positioned at the labels order returned by sits_labels.

Author

Rolf Simoes, rolf.simoes@inpe.br

Examples

Run this code
# show original samples ("Cerrado" and "Pasture")
sits_labels(cerrado_2classes)
# rename label samples to "Savanna" and "Grasslands"
sits_labels(cerrado_2classes) <- c("Savanna", "Grasslands")
# see the change
sits_labels(cerrado_2classes)

Run the code above in your browser using DataLab